window.onload = function() {

	var dataArr = [
		{picUrl: './resource/images/dota-4.jpg'},
		{picUrl: './resource/images/dota-15.jpg'},
		{picUrl: './resource/images/dota-23.jpg'},
		{picUrl: './resource/images/dota-1.jpg'},
		{picUrl: './resource/images/dota-7.jpg'},
		{picUrl: './resource/images/dota-8.jpg'},
		{picUrl: './resource/images/dota-9.jpg'},
		{picUrl: './resource/images/dota-10.jpg'},
		{picUrl: './resource/images/dota-20.jpg'},
		{picUrl: './resource/images/dota-17.jpg'},
		{picUrl: './resource/images/dota-14.jpg'},
		{picUrl: './resource/images/dota-2.jpg'},
		{picUrl: './resource/images/dota-12.jpg'},
		{picUrl: './resource/images/dota-13.jpg'},
		{picUrl: './resource/images/dota-3.jpg'},
		{picUrl: './resource/images/dota-6.jpg'},
		{picUrl: './resource/images/dota-24.jpg'},
		{picUrl: './resource/images/dota-11.jpg'},
		{picUrl: './resource/images/dota-16.jpg'},
		{picUrl: './resource/images/dota-18.jpg'},
		{picUrl: './resource/images/dota-19.jpg'},
		{picUrl: './resource/images/dota-5.jpg'},
		{picUrl: './resource/images/dota-21.jpg'},
		{picUrl: './resource/images/dota-22.jpg'}
	];

	var contentDom = document.querySelector('.content'),
		loadMoreDom = document.querySelector('.load-more'),
		wtf = new WaterFull('.content', {
			content: function(item, index) {
						return '<div class="wf-item wf-item-2"><img src="'+item["picUrl"]+'"/></div>';
					}
		});

	// 定位
	wtf.location();

	loadMoreDom.onclick = function() {
		// 加载更多
		wtf.create(dataArr);
	};

};